home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / lib / alib / fifolib.a < prev    next >
Text File  |  1994-02-01  |  710b  |  43 lines

  1.  
  2.             ;   autoinit if you ever reference the FIFO library
  3.             ;   library
  4.             ;
  5.             ;   (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.             ;
  7.             ;   can't use pc-relative between different code sections
  8.             ;   and cannot put string in autoinit section!
  9.  
  10.             xdef    _FifoBase
  11.             xref    __AutoFail0
  12.  
  13. _LVOOpenLibrary     equ    -552
  14. _LVOCloseLibrary    equ    -414
  15.  
  16.             section autoinit0,code
  17.  
  18.             moveq.l #0,D0
  19.             lea    fifoname(pc),A1
  20.             jsr    _LVOOpenLibrary(A6)
  21.             move.l    D0,_FifoBase(A4)
  22.             beq    __AutoFail0
  23.             bra    i10
  24. fifoname        dc.b    'fifo.library',0
  25.             ds.w    0
  26. i10
  27.  
  28.             section autoexit0,code
  29.  
  30.             move.l    _FifoBase(A4),D0
  31.             beq    l10
  32.             move.l    D0,A1
  33.             jsr    _LVOCloseLibrary(A6)
  34. l10
  35.  
  36.  
  37.             section libbss,bss
  38.  
  39. _FifoBase        ds.l    1
  40.  
  41.             END
  42.  
  43.